package leetcode.easy;

/**
 * ClassName: $344_ReverseString
 * Description:
 * date: 2021-12-13 19:29
 *
 * @author liyifan
 */
public class $344_ReverseString {
    public void reverseString(char[] s) {
        if (s.length == 0)
            return;
        int left = 0;
        int right = s.length - 1;
        while (left < right) {
            char tempChar = s[right];
            s[right] = s[left];
            s[left] = tempChar;
            left++;
            right--;
        }
    }
}
